import Vue from "vue";
import Router from "vue-router";
import Home from "@/pages/home/Home";
import City from "@/pages/city/City";
import Detail from "@/pages/detail/Detail";
import market from "@/pages/footer/market";
import message from "@/pages/footer/message";
import user from "@/pages/footer/user";
import succesIn from "@/pages/footer/succesIn";
import interesting from "@/pages/footer/interesting";

Vue.use(Router);

export default new Router({
  routes: [
    {
      path: "/",
      name: "HomeFooter",
      component: Home
    },
    {
      path: "/home",
      name: "Home",
      component: Home
    },
    {
      path: "/city",
      name: "City",
      component: City
    },
    {
      path: "/detail/:id",
      name: "Detail",
      component: Detail
    },
    {
      path: "/market",
      name: "Market",
      component: market
    },
    {
      path: "/message",
      name: "Message",
      component: message
    },
    {
      path: "/user",
      name: "User",
      component: user
    },
    {
      path: "/succesIn",
      name: "SuccesIn",
      component: succesIn
    },
    {
      path: "/interesting",
      name: "Interesting",
      component: interesting
    }
  ],
  scrollBehavior(to, from, savedPosition) {
    return { x: 0, y: 0 };
  }
});
